
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height, user-scalable=no,initial-scale=1, minimum-scale=1, maximum-scale=1 ">
<link rel="stylesheet" type="text/css" href="{{static_url('css/public.css')}}">
<script type="text/javascript" src="{{static_url('js/zepto.min.js')}}"></script>
<script type="text/javascript" src="{{static_url('js/public.js')}}"></script>
<style type="text/css">
table{
    color: #767676;
    margin-top: 15px;
}
table td{padding-bottom: 10px;}
table a{color: #55AAFD!important;}
.divcenter{height: 550px;margin-top: -290px;}
</style>
<body>
    <div class="divcenter" >
        <form id="form" method="post" action="index.html">
            <div class="form">
                <div class="text-center title">注 册</div>
                <table class="center">
                    <tr>
                        <td>姓名：</td>
                        <td><input type="password" class="full hcenter" id="Fname" name="Fname"></td>
                    </tr>
                    <tr>
                        <td>学号：</td>
                        <td><input type="password" class="full hcenter" id="Fno" name="Fno"></td>
                    </tr>
                    <tr>
                        <td>宿舍楼：</td>
                        <td>
                            <select name="Fdorm_id" id="Fdorm_id" class="full hcenter">
                                <option value="0">1号楼</option>
                                <option value="1">2号楼</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>寝室房间号：</td>
                        <td>
                            <select name="Froom" id="Froom" class="full hcenter">
                                <option value="0">102</option>
                                <option value="1">204</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>手机号：</td>
                        <td><input type="password" class="full hcenter" id="Ftel" name="Ftel"></td>
                    </tr>
                    <tr>
                        <td>年龄：</td>
                        <td><input type="password" class="full hcenter" id="Fage" name="Fage"></td>
                    </tr>
                    <!-- <tr>
                        <td>头像：</td>
                        <td><input type="text" class="full hcenter" id="p2" name="Favatar"></td>
                    </tr> -->
                    <tr>
                        <td><a href="{{url('user/student')}}">跳过</a></td>
                        <td><input type="submit" class="btn" value="保存"></td>
                    </tr>
                </table>
            </div>
        </form>
    </div>
    <div class="palert" id="talert">
        <span id="tc">请输入用户名或密码</span>
        <input type="button" onclick="palert.close('#talert')" value="关闭">
    </div>
</body>
<script type="text/javascript">
    $('#form').on('submit', function(){
        if($('#name').val() == '' || $('#p1').val() == '' || $('#p2').val() == ''){
            $('#tc').html('请输入用户名或密码');
            palert.open('#talert');
            return false;
        }else if($('#p1').val() != $('#p2').val()){
            $('#tc').html('两次密码不一致');
            palert.open('#talert');
            return false;
        }else if($('#Fname').val() == '' || $('#Fno').val() == '' || $('#Fdorm_id').val() == '' || $('#Froom').val() == '' || $('#Ftel').val() == '' || $('#Fage').val() == ''){
            $('#tc').html('请输入完整的信息');
            palert.open('#talert');
            return false;
        }
        alert($('#Fname').val())
        return false;
    });
</script>
</html>